<?php
/**
 * MineAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using MineAdmin.
 *
 * @Author X.Mo<root@imoi.cn>
 * @Link   https://gitee.com/xmo/MineAdmin
 */

declare(strict_types=1);
namespace Mine\Command;

use Hyperf\Command\Annotation\Command;
use Mine\MineCommand;

/**
 * Class MineAdmin
 * @package System\Command
 */
#[Command]
class MineAdmin extends MineCommand
{
    protected $name = 'mine';

    public function configure()
    {
        parent::configure(); // TODO: Change the autogenerated stub
    }

    /**
     * Handle the current command.
     */
    public function handle()
    {
        $result = shell_exec('php ' . BASE_PATH . '/bin/hyperf.php | grep mine');
        $this->line($this->getInfo(), 'comment');
        $this->line(preg_replace('/\s+mine\s+/', '', $result), 'info');
    }
}